//
//  ImageLabelView.m
//  Adorable_Things
//
//  Created by lanou on 16/1/11.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "ImageLabelView.h"

@implementation ImageLabelView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        // 动态获取宽度
        CGFloat width = frame.size.width;
        // 动态获取高度
        CGFloat height = frame.size.height;
        
        self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(width / 3, 5, kWidth / 12 - 5, 25)];
        [self addSubview:self.imageV];
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(self.imageV.right, self.imageV.top - 8, width / 3, height)];
        // 添加到自己身上
        [self addSubview:self.label];
    }
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
